/**
 * 
 */
package org.statewalker.core;

public class SimpleEvent implements IEvent {
    private final String fKey;

    public SimpleEvent(String key) {
        fKey = key;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!(obj instanceof SimpleEvent))
            return false;
        SimpleEvent o = (SimpleEvent) obj;
        return fKey.equals(o.fKey);
    }

    public String getKey() {
        return fKey;
    }

    @Override
    public int hashCode() {
        return fKey.hashCode();
    }

    @Override
    public String toString() {
        return fKey;
    }
}